package com.atguigu.gmall.pms.Vo;

import com.atguigu.gmall.pms.entity.ProductAttrValueEntity;
import lombok.Data;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;


import java.util.List;

@Data
public class BaseAttrValueVo extends ProductAttrValueEntity {

    public void  setValueSelected(List<String>valueSelected){
        if(!CollectionUtils.isEmpty(valueSelected)){
            this.setAttrValue(StringUtils.join(valueSelected,","));
        }else{
            this.setAttrValue(null);
        }
    }
}
